// 活动类型 - 需要显示活动标签的枚举
export const ACTIVITY_TYPE = {
  key: {
    SECKILL: 'SECKILL',
    PREFERENTIAL: 'PREFERENTIAL',
    FULL_REDUCE: 'FULL_REDUCE',
    CUSTOM: 'CUSTOM',
  },
  text: {
    SECKILL: '爆品',
    PREFERENTIAL: '特惠',
    FULL_REDUCE: '满减',
    CUSTOM: '自定义',
  },
};

// 活动状态
export const ACTIVE_KEY = {
  NOT_START: 'NOT_START',
  PROCESS: 'PROCESS',
  NOT_MAK_PUBLIC: 'NOT_MAK_PUBLIC',
  MAKE_PUBLIC: 'MAKE_PUBLIC',
  STOP: 'STOP',
};

// settlementType
export const SETTLEMENT_TYPE = {
  key: {
    STANDER: 'STANDER', // 标品
    CATTY: 'CATTY', // 非标品
  },
  text: {
    STANDER: '标品',
    CATTY: '非标品',
  },
};

// 活动标签
export const ACTIVITY_TAG = {
  UNCOMMITTED: {
    key: 'UNCOMMITTED',
    text: '未参加',
  },
  MANAGER_WAIT_DETERMINE: {
    key: 'MANAGER_WAIT_DETERMINE',
    text: '待审核',
  },
  MANAGER_REVIEWED: {
    key: 'MANAGER_REVIEWED',
    text: '已审核',
  },
};

// 活动商品状态
export const ACTIVITY_GOODS_STATUS = {
  MANAGER_WAIT_DETERMINE: {
    key: 'MANAGER_WAIT_DETERMINE',
    text: '待经理确定',
  },
  MANAGER_REVIEW_FAIL: {
    key: 'MANAGER_REVIEW_FAIL',
    text: '经理审核不通过',
  },
  AUDIT: {
    key: 'AUDIT',
    text: '审核通过',
  },
  WIN: {
    key: 'WIN',
    text: '中标',
  },
  FLUNK: {
    key: 'FLUNK',
    text: '未中标',
  },
};

/** 活动类型 */
const { key: activeKey, text: activeText } = ACTIVITY_TYPE;

export const CUSTOM_ACTIVITY_TYPE: Record<string, any> = {
  key: {
    ...ACTIVITY_TYPE.key,
    SUPER_SECKLL: 'SUPER_SECKLL',
  },
  text: {
    ...activeText,
    [activeKey.CUSTOM]: '其他',
    SUPER_SECKLL: '超爆',
    PRE_SALE: '预售',
  },
  color: {
    SUPER_SECKLL: '#fe5023',
    [activeKey.SECKILL]: '#fe5023',
    [activeKey.PREFERENTIAL]: '#fa4274',
    [activeKey.FULL_REDUCE]: '#ffb600',
    [activeKey.CUSTOM]: '#8c8c8c',
  },
};

// 单位
export const UNIT_ENUM: Record<string, string> = {
  PIECE: '件',
  BOX: '箱',
  BAG: '袋',
  SINGLE: '个',
  CATTY: '斤',
  BUNCH: '扎',
  BOX_CASE: '盒',
  BATCH: '批',
  BRANCH: '支',
};

export const VIOLATION_STATUS = {
  key: {
    TO_BE_CONFIRMED: 'TO_BE_CONFIRMED',
    CONFIRMED: 'CONFIRMED',
    APPEAL_SUCCESSFUL: 'APPEAL_SUCCESSFUL',
    APPEAL_FAILED: 'APPEAL_FAILED',
    APPEALING: 'APPEALING',
    PENDING_PAYMENT: 'PENDING_PAYMENT',
    PAID: 'PAID',
    TO_BE_PAID: 'TO_BE_PAID',
    INVALID: 'INVALID',
  },
  text: {
    TO_BE_CONFIRMED: '待确认',
    CONFIRMED: '已确认',
    APPEAL_SUCCESSFUL: '申诉成功',
    APPEAL_FAILED: '申诉失败',
    APPEALING: '申诉中',
    PENDING_PAYMENT: '待核销',
    PAID: '已核销',
    TO_BE_PAID: '待支付',
    INVALID: '作废',
  },
  color: {
    TO_BE_CONFIRMED: '#F7BE00',
    CONFIRMED: '#69B146',
    APPEAL_SUCCESSFUL: '#69B146',
    APPEAL_FAILED: '#999999',
    APPEALING: '#F7BE00',
    PENDING_PAYMENT: '#F7BE00',
    PAID: '#69B146',
    TO_BE_PAID: '#F7BE00',
    INVALID: '#999999',
  },
  icon: {
    TO_BE_CONFIRMED: 'iconfont icon_dengdai',
    CONFIRMED: 'iconfont icon_xuanzhong',
    APPEAL_SUCCESSFUL: 'iconfont icon_xuanzhong',
    APPEAL_FAILED: 'iconfont icon_shensu',
    APPEALING: 'iconfont icon_dengdai',
    PENDING_PAYMENT: 'iconfont icon_dengdai',
    PAID: 'iconfont icon_xuanzhong',
    TO_BE_PAID: 'iconfont icon_dengdai',
    INVALID: 'iconfont icon_shensu',
  },
};

// 结算类型 STANDER("标准品结算"), CATTY("实收斤数结算")
export const SETTEL_TYPE = {
  STANDER: 'STANDER',
  CATTY: 'CATTY',
};

// 订单状态
export const ORDER_STATUS = {
  key: {
    WAIT_CONFIRM: 'WAIT_CONFIRM',
    WAIT_PAY: 'WAIT_PAY',
    WAIT_TAKE_DELIVERY: 'WAIT_TAKE_DELIVERY',
    COMPLETE: 'COMPLETE',
    CANCEL: 'CANCEL',
    // ALREADY_CONFIRM: 'ALREADY_CONFIRM'
  },
  text: {
    '': '全部',
    'WAIT_CONFIRM': '待确认',
    'WAIT_PAY': '待付款',
    'WAIT_TAKE_DELIVERY': '待收货',
    'COMPLETE': '已完成',
    'CANCEL': '已取消',
    // 'ALREADY_CONFIRM': '已确认'
  },
};

// 支付信息
export const PAY_CHANNEL = {
  key: {
    WECHAT: 'WX_PAY', // 微信组支付
    BALANCE: 'BALANCE_PAY', // 余额支付
    REFUND: 'REFUND', // 退款
    OB_PAY: 'OB_PAY',
  },
  text: {
    WX_PAY: '微信',
    BALANCE_PAY: '余额',
    REFUND: '退款',
    OB_PAY: '网银',
  },
};

//应报商品详情报名状态
export const ENROLL_STATUS = {
  key: {
    NOT_ENROLL: 'NOT_ENROLL',
    ENROLLED: 'ENROLLED',
    CAN_NOT_ENROLL: 'CAN_NOT_ENROLL',
  },
  text: {
    NOT_ENROLL: '未报名',
    ENROLLED: '已报名',
    CAN_NOT_ENROLL: '不可报名',
  },
};

// 中标状态
export const BID_STATUS = {
  key: {
    WIN: 'WIN',
    LOST: 'LOST',
    NOT_ENROLL: 'NOT_ENROLL',
    NOT_MATCH: 'NOT_MATCH',
  },
  text: {
    WIN: '中',
    LOST: '落',
    NOT_ENROLL: '未',
    NOT_MATCH: '无',
  },
  color: {
    WIN: '#fff',
    LOST: '#f7be00',
    NOT_ENROLL: '#fe5023',
    NOT_MATCH: '#8c8c8c',
  },
  bgColor: {
    WIN: 'rgba(82,196,26,1)',
    LOST: 'rgba(247,190,0,0.1)',
    NOT_ENROLL: 'rgba(255,79,11,0.1)',
    NOT_MATCH: 'rgba(245,245,245,1)',
  },
  desc: {
    WIN: '代表中标商品',
    LOST: '代表提报商品落选未中标',
    NOT_ENROLL: '代表有符合条件的商品未报名',
    NOT_MATCH: '代表无符合选品要求的商品',
  },
};

